package com.ktjy.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ktjy.dto.DictTypeDto;
import com.ktjy.pojo.DictType;
import com.ktjy.mapper.DictTypeMapper;
import com.ktjy.service.IDictTypeService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 字典类型表 服务实现类
 * </p>
 *
 * @author author
 * @since 2025-08-20
 */
@Service
public class DictTypeServiceImpl extends ServiceImpl<DictTypeMapper, DictType> implements IDictTypeService {
    @Autowired
    private DictTypeMapper dictTypeMapper;

    @Override
    public IPage<DictType> findPage(DictTypeDto dictTypeDto, Integer pageNo, Integer pageSize) {
        //构造分页条件
        Page page = new Page(pageNo, pageSize);
        return dictTypeMapper.selectPage(page, dictTypeDto);
    }
}
